package com.youlai.boot.factory.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 工序基础信息表单对象
 *
 * @author youlaitech
 * @since 2025-10-01 05:02
 */
@Getter
@Setter
@Schema(description = "工序基础信息表单对象")
public class ProcessForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "工序ID，主键")
    @NotNull(message = "工序ID，主键不能为空")
    private Long id;

    @Schema(description = "工序编码，唯一标识")
    @NotBlank(message = "工序编码，唯一标识不能为空")
    @Size(max=50, message="工序编码，唯一标识长度不能超过50个字符")
    private String processCode;

    @Schema(description = "工序名称")
    @NotBlank(message = "工序名称不能为空")
    @Size(max=100, message="工序名称长度不能超过100个字符")
    private String processName;

    @Schema(description = "工序描述")
    @Size(max=500, message="工序描述长度不能超过500个字符")
    private String processDescription;

    @Schema(description = "标准工时（分钟）")
    private BigDecimal standardTime;

    @Schema(description = "工序单价（元）")
    private BigDecimal unitPrice;

    @Schema(description = "工序类型：前道/后道/整烫/包装等")
    @Size(max=50, message="工序类型：前道/后道/整烫/包装等长度不能超过50个字符")
    private String processType;

    @Schema(description = "难度等级：1-简单，2-一般，3-困难")
    private Integer difficultyLevel;

    @Schema(description = "所需技能")
    @Size(max=100, message="所需技能长度不能超过100个字符")
    private String requiredSkill;

    @Schema(description = "设备要求")
    @Size(max=200, message="设备要求长度不能超过200个字符")
    private String equipmentRequirements;

    @Schema(description = "质量标准")
    @Size(max=65535, message="质量标准长度不能超过65535个字符")
    private String qualityStandards;

    @Schema(description = "工序顺序（用于默认排序）")
    private Integer sequenceOrder;

    @Schema(description = "是否启用：0-停用，1-启用")
    private Integer isActive;

    @Schema(description = "创建人")
    @Size(max=50, message="创建人长度不能超过50个字符")
    private String createBy;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    @Size(max=50, message="更新人长度不能超过50个字符")
    private String updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


}
